Shamkhalate of Kazi-Kumukh | ||||
|
||||
Capital | Kazi-Kumukh | |||
Religion | Islam | |||
Government | Constitutional monarchy | |||
History | ||||
- Established | 11th ce | |||
- Disestablished | 17th ce |
Shamkhalate of Kazi-Kumukh — Lak state that existed on the territory of present-day Dagestan in 11th-17th centuries. The capital of Shamkhalate was Kazi-Kumukh. In 16th century Shamkhalate consisted of the following territories: part of northern Azerbaijan, southern Dagestan, principality of Tarki, principality of Tumen, principality of Chechnya (Michiki) and part of Kabarda.
Contents |
In the 8th century the Arab caliphate persistently strive to gain a foothold in Dagestan for political hegemony in the Eastern Caucasus. In 733 Arabs establish their rule in Kumukh.[1][2] The ruler of Kumukh is named with the title "Shamkhal".[3][4][5][6][7] In 777 the construction of cathedral mosque in Kumukh was completed, where an Islamic party appeared.[8] In 797 Khazars carried out an invasion of Dagestan.[9][10]
In the 8th CE in the mountainous Dagestan there were such principalities as: Tabasaran, Tsakhur, Kumukh, Khunzakh, and Kaitag. [11][12][13][14] In the 9th century mountainous Dagestan liberates itself from the power of the Arab caliphate. By 965 the Khazar Kaganate disintegrates.
At the end of 11th century Shamkhals make Islam a state religion in Kumukh. Kumukh becomes the primary stronghold of Islam in Lakia where Amir Kalantar, leader of Islamic warriors and a missionary who arrived here from Mecca in 11th CE, was buried.[15][16] Shamkhal, the feudal ruler of Kumukh, having military force of Islamic warriors (gazies) pursues an active policy of spreading Islam in the country of the mountains. Every year Shamkhals organized military campaigns of gazies that sometimes were assisted by Firaburz I (1063–1096), the ruler of Shirvan. Consequently Kumukh gets an honoured prefix of "Gazi".[3]
A Muslim kingdom with the capital in Kazi-Kumukh, that was formed on the advent of 11th-12th centuries, begins to play an important role in spiritual and political life of Dagestan.[17][18] Along with Shamkhalate of Kazi-Kumukh there appeared a number of other political formations in Dagestan such as Maisumate of Tabasaran, Tsakhur, Nutsalate of Avaria and Utsmiate of Kaitag.[19][20][21]
Through Kumukh passed one of the branches of the northern Silk Roads, where merchants from Bukhara, Istanbul and Hindustan arrived. The peoples of Dagestan get affiliated with the most developed in the medieval world Islamic civilization.
In 1239 Tataro-Mongols invaded Dagestan.[22] Kurbiev M. writes that after the subjugation of Derbent and Tarki, Tataro-Mongols headed to capture the capital of Laks, the city of "Al-Lak and Gumik".[23] The first fight with Tataro-Mongols happened on approaches to Agul village of Richa, where the army of Shamkhal had taken defensive positions. Between the troops of Shamkhal and Tataro-Mongols bitter fights took place. After 25 days of fights in Richa, Shamkhal retreated to his fortress on the mountain. Tataro-Mongols approached the fortress of Kazi-Kumukh and began a siege using machines and catapults. The siege of Kazi-Kumukh lasted over six months.
In 1240 on April 8, an ancient religious and political center "Al-Lak and Gumik", the fortress-city of Kumukh, was captured and destroyed. In ancient times on top of the hills in Kumukh were several fortresses known as Khannal-Kala, Burgai-Kala and Chikkula-Kan that were adjoined by residential neighbourhoods. The fortress of Chikkul was captured last. For many years Kumukh and surrounding it villages remained in ruins.
According to М. Kurbiev there was a fortress not far from Kumukh built in the early 4th CE by a Lak king. Ruins of this fortress are easily looked over today: "These are the bare stone-walls of three meters wide, on which a wagon can pass freely, bits and pieces of three round and enormous in form foundations of towers that are in the upper northern part of the ancient settlement. Towers probably were symmetric, one large in the middle and two little on each side, built into a wall". On the mountain "Khatti-baku" ("The hill of the cross" from Lak language), Mongols destroyed a unique monument of medieval culture — chapel of the Lak king built in the 7th century.[24]
Ismey-Haji Guseinov writes: "In spring of 1240 Bugdei, one of warlords of Batu Khan, approaches Kumukh and after a fierce resistance of defenders of the fortress takes the capital of Shamkhalate. However, Mongols had not managed then to establish themselves in Lakia as well as in other regions in the mountains of Dagestan".[25] Shamkhalate restores its might and becomes the strongest in Northern Caucasus. In 1302–1304 a "Persian Shah" of Islamic Ilkhanate of Iran who sent gifts to Shamkhal was none other than the descendant of Genghis Khan, Ghazan Khan (1295–1304). Records of Ali Kayaev show that by the early 14th century in Kazi-Kumukh along there were 14 mosques.
In the period of 1318 the empire of Tataro-Mongols was divided into two camps: Ilkhanate headed by Abu Said and the state of the Golden Horde headed by Uzbeg Khan. The border in the Eastern Caucasus passed near Derbent. In the center of this conflict was Kazi-Kumukh which for a long time endured the devastating raids of both powers. Kazi-Kumukh was destroyed by Turks eight times. Kammaev S. K. writes: "The mightiest foreign invaders waged wars on Kumukh and here were the most cruel battles with them".[26]
Nizameddin Shami mentions "Kazi-Kumuk" as an ally of the Golden Horde.[27] At a certain period of time Dagestan was under the influence of Tataro-Mongols. At the beginning of 14th century Shamkhalate is named in Turkic as Dagestan — Country of the Mountains.
In the spring of 1394 Tamerlane intruded into Derbent. In 1395 taking over all the lowlands of northern Dagestan, Tamerlane moved to Kaitag. Shamkhal of Kazi-Kumukh undertook few campaigns against Tamerlane. In one of them "Shamkhal of Kazi-Kumuk and Avhar" with an army of 3000 persons attacked Tamerlane in a neighborhood of Akusha-Dargo.[28] Nizameddin Shami reported that "Shamkhal of Kazi-Kumuk had a custom to accomplish each month a military campaign against the unbelievers" that Tamerlane wanted to put to his use.[29] Eoan de Galifontibos writes that: "Tamerlane made an attempt to get into the mountains of their country having one hundred thousand armed worriors but before a dense forest he met an army that infliceted on him such losses that Tamerlane ordered to retreat" understanding that he will be able to subordinate this country only by a peaceful way.[30] A battle against Tamerlane was perpetuated in Lak epos of Partu Patima.
In 1395 on the banks of river Terek Tamerlane defeated the army of his opponent Tokhtamysh, the Khan of Golden Horde.[31] In 1396 Tamerlane returned to Dagestan and went against Shamkhal of Kazi-Kumukh. After many months of siege and battles Tamerlane took fortresses of Kuli and Tayus. Sharafuddin Yezdi, Tamerlane's court historian, writes: "Heavy resistance is overcome, fortresses captured, inhabitants defeated, Shamkhal is killed himself". Historians of Tamerlane do not inform about the capture of Kazi-Kumukh.
Lak rulers concluded a treaty with Tamerlan to carry on "a holy war against the unbelievers" as they did before. Tamerlane richly endowed the feudal apex of Laks ("emirs, nobles, grandees"). In this connection the Islamic clergy of Kazi-Kumukh strengthened its positions and influence in the region. Shikhsaidov A. relates this time to the holy war that Shamkhal of Kazi-Kumukh waged on "unbelievers" in neighbouring lands.[32] Shamkhal of Kazi-Kumukh gets the title "Wali (ruler) of Dagestan".
At the end of 14th century there appears a catholic mission of Franciscans, trying to establish the "Episcopate of the Caspian mountains".[33]
In 15th century Shamkhals of Lakia emerge as rulers and leaders of Islamization process in Dagestan. In 1430 Gazi-Gumuk was an important center of Muslim education in Dagestan. Kazi-Kumukh was the capital of Shamkhalate and not surprisingly here arrived from far away a scholar of Islamic sciences Ahmad bin Ibrahim bin Muhammad al-Gazi-Gumuki ad-Dagestani al-Hasani al-Shafiyi, died in 1450. He was a big religious figure, mudarris, scientist, rewriter of manuscripts and a preacher of Islam in Dagestan. Before moving to Kazi-Kumukh he taught at the university of Al-Azhar in Cairo. Some time lived in Yemen and then by the order of the ruler of Egypt he arrived in Kazi-Kumukh. From December 1434 Ahmad al-Yemeni lived in Kazi-Kumukh where he had five children. Ahmad al-Yemeni played a noticeable role in political and spiritual life of Shamkhalate of Kazi-Kumukh. Kazi-Kumukh becomes one of the centers of Islamic jurisprudence in the Caucasus.[34] On the "Yemeni cemetery" preachers of Islam from Yemen were buried.[35] Krachkovski I. writes about "Dagestan and Yemen" in his works.
In the medieval Dagestan there were established several centers of Muslim theology and sciences such as: Gazi-Kumukh, Derbent, Akhty, Tsakhur, Akusha, Sogratl, Khunzakh, Andirey, Yarag and Bashly.
There were several states in Dagestan — Maisumate of Tabasaran, Nutsalate of Avaria, Utsmiate of Kaitag, Derbent, and Shamkhalate of Kazi-Kumukh which consisted of several states of the southern and northern Daghestan such as: Kazi-Kumukh, Agul, Kura, Rutul, Tsakhur, Andalan, Andi, Tarki, Bujnak, Andirey and Tumen.[36][37][38]
In 15th century Shamkhals ("Padishah al-Gumuki" in local sources, "Shevkalsky Tsar" in Russian) completed the religious enlightenment of Dagestan and with the support of Utsmi of Kaitag, Maisum of Tabasaran and Nutsal of Khunzakh, directed the energy of highlanders to external wars. Raids on "unbelievers" of Georgia and Cherkessia become regular. According to Turkish sources the army of Shamkhal in this period consisted of about 100 thousand man.[39] In a "Testament" of Andunik-Nutsal (1485), who estimating the military power of feudal rulers of Dagestan wrote: "100 thousand men in the army of Padishah al-Gumuki".[40]
In this period Shamkhalate of Kazi-Kumukh becomes the largest state of the Caucasus, spreading beyond Terek river in the north, and in the south reaching Shabran. Laduev U. writes that after embracing Islam "Chechens consented to paying tribute to Shamkhal named as Wali of Dagestan". Also "Chechnya is the possession of Shamkhal". Some princes of Kabarda were dependent on Shamkhal. The territory of Shamkhal covered the whole of North-Eastern Caucasus and part of Transcaucasia. Academician V. Barthold writes: "Shamkhalate of Gazi-Gumuk was spreading its political domination from its mountainous country in the north-eastern direction up to the coastal regions in 11th-16th centuries".[41] Historian Gadjiev V. writes: "Shamkhalate in the period of its political domination became a very large state on the map of medieval Caucasus".[42]
In the first half of 15th century Safavid Persia enters the political arena of Caucasus. The support of Safavids became Turkic nomadic tribes that got the nickname of Qizilbashes – red heads.
In 1447 Shaykh Junayd, the leader of Qizilbashes, ascends on the throne of Persia. Junayd decided to conquer Shirvan and Dagestan. The ruler of Shirvan Khalilullah appealed to Shamkhal of Kazi-Kumukh for help. In 1456 on the banks of river Samur a battle took place between the troops of Junayd and the united forces of Shamkhal of Kazi-Kumukh. The Persian army was defeated. Junayd was killed himself.
In 1456 the proceeding Safaviyya leader Shaykh Haydar took Derbent and began to carry out raids on the off-shore districts of Shamkhalate. In 1488 in Tabasaran during a bloody battle, Shah Haydar sustained defeat.
In 1547 the ruler of Shirvan Alqas-Mirza allied with Shamkhal of Kazi-Kumukh and heaved up a revolt against Safavids, but after the suppression of revolt retreated to Kazi-Kumukh.[43] In 1549 in Shirvan a new revolt against Safavids took place headed by Burhan-Mirza who retreated to Kazi-Kumukh as well. However later Shamkhal of Kazi-Kumukh and the ruler of Shirvan began competing for the hegemony in the Northern Azerbaijan. King of Kakheti Levan, an ally and kinsman of Shamkhal, also feuded with Shirvan.
In 16th century Ottoman Empire enters the political arena of Caucasus. Safavid Persia becomes the strongest regional opposition. Wars between Turkey and Safavid Persia begin. The rulers of both countries keenly desired to ally with Shamkhal of Kazi-Kumukh, as he was a big political figure in the Caucasus. King of Kakheti Levan became a mediator between the Shah and Shamkhal, promoting the convergence of the latter.
Ismey-Haji Guseinov writes: "Between Safavid Shah and Shamkhal of Kazi-Kumukh a political and military alliance was made which was strengthened by a marriage between Shah Tahmasp I and the daughter of Shamkhal. Together with fiancée to Persia went cavalry troops led by Sultan, the son of Shamkhal. From this marriage the Shah had daughter Perihan-Khanum and son Sulaiman-Mirza".[25]
In the 15th-16th centuries political might of Shamkhal of Kazi-Kumukh reaches its peak.[44] Shamkhal collected tax in grain and cattle from the territories of Northern Azerbaijan, Dagestan and Cechnya. In the time of war Shamkhal was the leader of the army. Great powers of that time as Russia, Ottoman Empire and Sefevid Persia consider Shamkhal to be a strong ruler. The house of Shamkhals of Kazi-Kumukh was one of the most ancient ruling dynasties in Dagestan that had intermarriages which the princes of Kabardino-Balkaria, rulers of Persia, Kakheti and Crimea.[45]
The city of Tarki becomes a strategic point of Caspian Sea passage that permitted to control the movement of troops and merchant caravans which brought large revenues to the treasury. Important root of caravan trade in Dagestan was the Caspian, leading from Derbent to Tarki and through Andirey to Astrakhan, also via the North Caucasus to Kabarda and further to the Crimean and the Ottoman territories. Caravans also traveled through the central mountainous Dagestan - from Shaki to Kazi-Kumukh, Avaria and then to Chechnya. Dagestani merchants actively involved themselves in transit trade.[46] In commercial transactions gold and silver money of neighboring states were used.[47]
A common economic zone emerged with neighbouring regions. Unknown in other regions of Caucasus, every village specialized in a certain craft. Almost every village was a workshop organization, supplying the needs of common internal and external market. The second name of Kazi-Kumukh becomes a "large market" where a fair every Thursday was conducted.
Shamkhals carry out frequent trips from Kazi-Kumukh to their winter residence in Bujnak city and later in Tarki. Ali Kayaev writes about Shamkhals that "their strong branch migrated from Kazi-Kumukh to the lowlands" of Dagestan.[48]
Besides Kazi-Kumukh there were many other branches of extended Shamkhal family that ruled most of Dagestan: branch of Bujnak where the residence of Vice-Shamkhal was, branch of Tarki, branch of Andirey, and branch of Andi that united Ando-Tsezian people. In the south of Dagestan Kura was the stronghold of Shamkhal of Kazi-kumukh and military center that blocked the path of invaders through the central mountainous Dagestan. In the course of Islamization, Shamkhals became rulers of the conquered lands. As Marshaev writes: "On subordinated territories Shamkhals settled their sons on beneficiary rights, many of whom eventually became hereditary landlords".[49] Derbent, Tabasaran and Tsakhur in greater period of their history were part of Persia.
The title "Shamkhal" in the first half of the 16th century was no longer hereditary, and was passed by seniority.[50] Turkish historian Mehmet Efendi writes about the election of Shamkhal that members of the house of Shamkhal "following the ancient custom of their ancestors depart for Kazi-Kumukh. Here in the gathering of princes the election of a new Shamkhal takes place".[51] Also there was elected a "Krim-Shamkhal", meaning the Vice-Shamkhal, from Lak "Kiriw-Shamkhal".[52]
Inscriptions from cemetery in Kazi-Kumukh inform that in 1553, prince Muhammad was killed in winter "in a battle with unbelievers of Cherkessia". "This is the grave of Budai-Shamkhal, son of Umal Muhammad-Shamkhal".[53] Umal Muhammad was the father of two brothers — Surkhay and Budai. Ayetberov notices that the descendants of Surkhay we see only in lowlands of Dagestan (Ildar-Shamkhal, Girey of Tarki and others) and the descendants of Budai only in Kazi-Kumukh. It is considered in the historiography of Dagestan that Shamkhals migrated to the lowlands from Kazi-Kumukh not later than the 16th century. In the 17th century Shamkhals were still buried in Kazi-Kumukh in the cemetery of Shamkhals. Last grave belongs to Surkhay-Shamkhal and dates back to 1641.[54]
In 1556 diplomatic relations with the Moscow state were set. The peaceful embassy of Shamkhal brought Ivan the Terrible a number of rich gifts, one of which was extraordinary: an elephant, not seen up to that time in Moscow.[55]
In 1557 prince Temruk Idarov of Kabarda appealed to Ivan the Terrible with a request to help and protect him against the raids of Shamkhal. The heir of Shamkhal, the Vice-Shamkhal, appealed to Russia with a request to accept his allegiance.
In 1560 Ivan the Terrible sent his general Cheremisov with troops by sea from Astrakhan against Shamkhal of Kazi-Kumukh. Cheremisov landed in Tarki, defeated the detachment of Shamkhal, took over Tarki but decided not to remain there fearing the arrival of Shamkhal forces from Kazi-Kumukh.[56] Russia won over Shikhmurza Okotsky who rendered considerable services to prince Temruk, the opponent of Shamkhal. Russians capturing Kazan and Astrakhan were moving to Caucasus.[57]
In 1566 Matlov, one of the princes of Kabarda , turned to Ivan the Terrible with a request to put a town on Terek River near the mouth of Sunzha River.
In 1567 trying to prevent Russians to establish their stronghold at the confluence of Sunzha and Terek, Budai-Shamhal and later his brother Surkhay were killed on the battlefield, as evidenced by their tombstones at the cemetery of Shamkhals in Kazi-Kumukh.[58]
In 1569 prince Chopan, son of Budai-Shamkhal, is crowned in Kazi-Kumukh as Shamkhal. The ceremony of coronation was of Iranian standard: girding with a sword and putting a crown on the head. Chopan-Shamkhal became the famous king of Dagestan. Territory of Chopan-Shamkhal in the north extended beyond Terek river and adjoined the Khanate of Astrakhan. In the west his territory included the whole of Chechnya and part of Kabarda. Chopan-Shamkhal had allies among the nobles in Kabarda who served him. In the south, territories of Chopan-Shamkhal extended "up to Shemakha itself" according to I. Gerber.[59][60] The name of Shamkhal must be Persian, known as "Juvan" and pronouncing by Turks as Chopan. There are other forms such as: Chupan, Jufan, Chobin, Chopalov. The Shamkhalate state was managed according to Islamic laws. Judiciary belonged to Qadies. Constabulary functions were executed by "Nukers". Government policy was enacted by Divan assembly.
In 1570 Chopan-Shamkhal goes with his troops to capture Astrakhan. This expedition was undertaken jointly with Turks and Crimeans. The siege of Astrakhan was not successful and troops retreated to Azov. Chopan-Shamkhal demolished the Russian fortress on Sunja river, intruded in Kabarda and took part in a battle against the army of ally of Tsar Ivan IV on the side of the Crimean Khan Devlet-Girey.[61]
In 1571 Crimean Devlet Girey-khan took Moscow and categorically demanded to demolish a fortress that was not allowing Muslims to set forth for Haj and carry on trade.[62] The fortress on Terek erected for protecting Kabarda and her ruler Temruk from Shamkhal was demolished. However in spite of demolishing the fortress, advancement of Russians to Caucasus by the end of 1580th recommenced.
In Persia in the court of the Shah in the period of celebrations, the king of Dagestan had an honorable place next to the throne of the Shah. Shamkhal was among the noblest and strongest rulers and allies of the Shah, along with king of Georgia and ruler of Afghanistan. According to A. Kayaev influence of Chopan-Shamkhal in Caucasus was great and "he allowed himself to interfere in matters of inheritance of Persian throne". Sister of Chopan-Shamkhal was married to Shah Tahmasp I (1514–1576). After the death of Tahmasp I in 1576 Haydar Mirza, Tahmasp's son by a Georgian mother, was elected on a Sefevid throne. In view of this Chopan-Shamkhal led his troops together with other supporters to the capital Tabriz. Haydar was removed and Ismail emerged triumphant.
In 1577 at the royal court of Persia a coup took place. Shah Ismail II was killed. Power in Persia was seized by Qizilbashes who were hostile to Sunni Caucasus. In the 16th century Qizilbashes overmastering all of Iran began to raid Sunni Shirvan, which wasn’t dangerous for Dagestan. Chopan-Shamkhal jointly with his brother Tujalav-Bek who was the ruler of Avaria, Gazi-Salih of Tabasaran, and in alliance with the Turkish army undertook a military campaign against Qizilbashes, who were completely defeated and retreated out of Shirvan.
After turning Qizilbashes out of Shirvan, Chopan-Shamkhal set friendly relationships with Turkey, carried out a visit there and was met in Salanchaks in Eastern Anatolia with great honours shown to the dignitaries of states. In reward for taking part in war against the Qizilbashes, Chopan-Shamkhal was given many gifts, including banners embroidered in gold, dressing-gown, sabre and war-horse with complete equipment. Ibrahim Pechevi reports that "Osman-Pasha married the daughter of Tujalav-Bek, brother of Chopan-Shamkhal". Chopan-Shamkhal pledged to protect Shirvan. Yakob Raynes writes: "All Caucasus had respect for him".[63]
However the end of 70th was marked by a war between Dagestan and Turkey. Sultan Murad III resumed military operations against the Persians. Chopan-Shamkhal understood that establishment of Turkey in Shemakha can result in the loss of independence of his state. In the beginning Shamkhal rendered support to the Turks against Persia, but later refused to participate in wars with Persians.
In 1578 Chopan-Shamkhal died in Bujnak. Bakikhanov A. K. writes: "Situation in Dagestan was dim. Chopan-Shamkhal who possessed all the lands from the borders of Kaitag, Kura, Avaria, Cherkesia and Terek river up to the Caspian Sea, died in Bujnak. His sons divided all the lands between themselves".[64][65] These events served the first reason for disintegration of Shamkhalate, and the following internecine war between feudal rulers of Dagestan.
In 1578 Caucasus was invaded by 200 thousand army of Mustafa-Pasha. The Turks capturing Shemakha began to make military expeditions into the mountains of Dagestan. In 1582 a detachment of Jafar-Pasha went from Derbent to Gazi-Kumukh. "Gazi-Kumukh was subjected by Turks to a terrible devastation". These predatory campaigns raised the population of Dagestani villages in arms against the Turkish Janissaries.
In 1588 Georgian ambassadors Kaplan and Hurset informed Russian Tsar about the raids of Shamkhal and asked the Tsar to send troops. Georgian Tsar Alexander gave Moscow all the information about the army of Shamkhal and the plan of the route: Tumen, Tarki, Kazanish, Kazi-Kumukh, Tsakhur, advising Russians to set fortresses in Tarki, Turali, Bujnak, and to defeat Shamkhal it is necessary to capture Kazi-Kumukh.[66] In 1588 Russians captured the principality of Tumen in the northern part of Dagestan.[67] Inhabitants of Tumen paid tribute to Shamkhal.
Shamkhal appealed to the Turkish Sultan for support, informing about the alliance of Russia, Persia and Georgia against him.
Nevertheless, Shamkhalate succeeded to win wars of 1589-1607 with the Moscow state. Attacks of 1590 and 1594 were repelled. Georgia subsequently refuses to fight against Shamkhal.[68] In 1605 Russian army that occupied lowlands of Dagestan (about 50 000 men, including 8000 shooters of the Moscow garrison), was knocked out from fortresses in Sunja, Sulak, city of Tarki and then surrounded and destroyed on Karaman field, 20 kilometres north of Makhachkala. All attempts of Tsar Boris Godunov to conquer Shamkhalate of Dagestan end in defeat.
Here what Dutch merchant Isaac Massa (1587–1635) writes about it in his "Short information about beginning and origin of modern wars and strife in Moscovy": "Tsar Boris sent 50000 men among whom were Polish and Livonians also and most of them perished, not many returned. In Moscow there were people telling so much about that country and people that it would fit few books to write about it and they told that in some places they met people as strong as giants who never part with their weapons, neither in the field at the plough tail nor at home, their dwellings are arranged in large caves because there are many mountains and wonderful valleys besides and in mountains there is much cattle. The one who revealed to us these news was wounded in a campaign by many arrows and told us that he with his comrades roamed for long before they reached the Caspian Sea. So not many returned to Moscow attaining nothing". Karamzin N. M. adds: "This battle was misfortunate".[69]
In line with the Treaty of Istanbul of 1590 between the Ottoman Empire and Safavid Persia, Dagestan is acknowledged under the protection of sultan from the dynasty of Osman. This point was confirmed by agreements on the division of Caucasus in 1612 and 1619. Shamkhal of Kazi-Kumukh was an ally of Turkey. The Turkish army never had its bases in Dagestan, unlike other territories of Caucasus. Turkish sultan used to name Shamkhal as Padishah of Dagestan.
At the beginning of 17th century military power of Turkey diminishes in Caucasus, which results in regional domination of Persia. Shah Abbas I of Persia began the conquest of Caucasus, occupied Derbent and put his deputy there. Aggression of Qizilbashes recommences. According to Iskander Munshi, Shah Abbas practiced mass executions of sunnies in Azerbaijan, and violently implanted Shia Islam in occupied territories.[70]
In 1615 Shah Abbas decided to take advantage of feudal internecine war that was flaming up in Shamkhalate of Kazi-Kumukh. Sultan-Mahmud of Andirey disputed his hereditary rights with Girey of Tarki. As a result of these discords, Sultan-Mahmud adhered to pro-Turkish and Giray of Tarki to a pro-Iranian and Russian orientation. All attempts of Andia-Shamkhal of Kazi-Kumukh to persuade Girey to give up his plans fell flat. Shah Abbas married the sister of Girey and decided to send troops to Dagestan against his opposition. However a revolt that took place in Georgia in 1615 September 15, prevented it. In 1617 the army of Shah Abbas I came to Kakheti trampling everything on its path, turning the cities into ashes and looting monasteries.[71] In 1619 after the death of Girey, Eldar, brother of Girey, becomes the ruler of the Tarki principality. Shah Abbas provoked Eldar to deprecate against Sultan-Mahmud and Andia-Shamkhal of Kazi-Kumukh.
In 1623 after the death of Andia-Shamkhal, a fight for throne between the rulers of Shamkhalate began again. On convention it was decided that the heir of Andia-Shamkhal will be Eldar, and the heir of Vice-Shamkhal (next Shamkhal), will be Aidemir, son of Sultan-Mahmud. In 1623 Eldar becomes Shamkhal of Kazi-Kumukh. Coronation and large banquets took place in Kazi-Kumukh. In 1635 Eldar-Shamkhal died. Aidemir, son of Sultan-Mahmud, becomes Shamkhal. Aidemir travelled to Kazi-Kumukh, "where according to their customs Shamkhal is crowned", gave people horses, bulls and sheep as gifts. He was given allegiance by all representatives of feudal class in Kazi-Kumukh, except for the descendents of Eldar-Shamkhal who were settled in Tarki.[72] The sons of Eldar-Shamkhal being displeased at the election of Aidemir, appealed to the Shah of Persia to support them. In 1640 Aidemir-Shamkhal died. Next Shamkhal becomes Surkhay.[73]
Ali Kayaev reports that in the middle of 17th century a fight for the throne of Shamkhalate between the sons of Chopan-Shamkhal "lasted for 30 years. Great number of people died there". Feudal strife led to the formation of some new domains. Dagestan fell into feudal disunity.
In 1642 Surkhay-Shamkhal (1640–1667) moved his capital from Kazi-Kumukh to Tarki. In Kazi-Kumukh "Proud Lak uzdens (free citizens) considered it an insult to the ancient capital".[74] To rule Kazi-Kumukh Laks elect Alibek II who establishes an independent Khanate of Kazi-Kumukh. In this period there existed already in Dagestan such independent states as Kaitag, Avar, Tabasaran, Derbent, Elisu, Mekhtula and Andirey. Subsequently the title "Shamkhal" passes to the nobles of Shamkhalale branch in Tarki where an independent Shamkhalate of Tarki was formed. All Shamkhalate branches in Dagestan were associated with Kazi-Kumukh, and Surkhay-Shamkhal breaking away from Kazi-Kumukh lost his political power in most of Dagestan.[75]